// 聊天好友
const mongoose = require('mongoose')

const friendSchema = new mongoose.Schema({
    user: {
      type: mongoose.Schema.Types.ObjectId,
        ref: 'User',
        required: [true, '请传递自己的id']
    },
    friend: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'User',
        required: [true, '请传递朋友id']
    },
    createTime: {
      type: Number,
      required: true                                                                                                                                                                                                                                      
    }
})

const Friend = mongoose.model('friend', friendSchema)

module.exports = {
  Friend
}
